<template>
    <el-tooltip content="发布个人美食" placement="top">
        <el-button class="add-button" circle @click="addPost">
            <el-icon>
                <Plus />
            </el-icon>
        </el-button>
    </el-tooltip>
</template>
<script setup>
import { useRouter } from 'vue-router';
const router = useRouter();
const addPost = () => {
    router.push('/release');
};
</script>
<style scoped>
.add-button {
    background-color: #007bff;
    width: 50px;
    height: 50px;
    position: fixed;
    /* 固定定位 */
    top: 50%;
    /* 距离顶部的距离 */
    right: 20px;
    /* 距离右侧的距离 */
    transform: translateY(-50%);
    /* 垂直居中 */
    z-index: 1000;
    /* 确保图标在最上层 */
}
.el-icon {
    font-size: 24px;
    font-weight: bold;
    color: white;
}
</style>